/*
 * TSPPathMatrix.h
 *
 *  Created on: Feb 28, 2011
 *      Author: santiago
 */

#ifndef TSPPATHMATRIX_H_
#define TSPPATHMATRIX_H_

#include <vector>
#include "TSPPath.h"

using namespace std;

class TSPPathMatrix {
public:
	TSPPathMatrix(unsigned int cant_nodos);
	virtual ~TSPPathMatrix();

	TSPPath* get_path(unsigned int node_i, unsigned int node_j);
	void set_path(unsigned int node_i, unsigned int node_j, TSPPath* path);
	void remove_path(unsigned int node_i, unsigned int node_j);
	int size() const;

	void show() const;
private:
	vector<vector<TSPPath*> > _P;
	unsigned int _cant_nodos;

	void convert_to_matrix(unsigned int node_index_1, unsigned int node_index_2, unsigned int &first_node_index, unsigned int &second_node_index) const;
};

#endif /* TSPPATHMATRIX_H_ */
